package com.ftg.product.shoumai.controller;

import com.ftg.product.lao.pojo.Lao;
import com.ftg.product.lao.service.LaoService;
import com.ftg.product.shoumai.pojo.Xiaoshoushuju;
import com.ftg.product.shoumai.service.XiaoshoushujuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author zwl
 * Create on 2019/5/16 18:36
 * function
 */
@RestController
@CrossOrigin
@RequestMapping("/xiaoshoushuju")
public class XiaoshoushujuController {
    @Autowired
    XiaoshoushujuService xiaoshoushujuservice;

    @GetMapping("/show")
    public Map<String, Object> show() {
        List<Xiaoshoushuju> list = xiaoshoushujuservice.show();
        Map<String, Object> map = new HashMap<>();
        map.put("code", "0");
        map.put("data", list);
        return map;
    }
}
